﻿<UserControl x:Class="Ares.GUI.Views.NewProjectView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
             xmlns:AresControls="clr-namespace:Ares.GUI.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <ScrollViewer Grid.Row="0">      
            <Grid Margin="0,0,5,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Margin="0,0,0,20">
                    <Label Margin="5,10,5,5" Content="Project's Name" FontSize="18" Foreground="#666" Padding="0" BorderBrush="#666" BorderThickness="0,0,0,1" />
                    <AdornerDecorator>
                        <TextBox x:Name="SearchTextBox" Text="{Binding ProjectName, Mode=TwoWay}" Margin="10,0,5,0">
                            <!--<AresControls:WatermarkService.Watermark>
                                <TextBlock VerticalAlignment="Center">Enter the project's name here...</TextBlock>
                                </AresControls:WatermarkService.Watermark>-->
                        </TextBox>
                    </AdornerDecorator>
                </StackPanel>
                <Label Margin="5" Grid.Row="3" Grid.Column="0" Content="Type:" HorizontalContentAlignment="Right"  />
                <ComboBox Margin="5" Grid.Row="3" Grid.Column="1" ItemsSource="{Binding BackupMethods, Mode=TwoWay}" SelectedItem="{Binding CurrentProject.Method}" VerticalAlignment="Center" />
                <Label Grid.Row="4" Grid.ColumnSpan="2" Margin="5,10,5,5" Grid.Column="0" Padding="0" BorderThickness="0,0,0,1" Foreground="#666" BorderBrush="#666" Content="Folders" FontSize="18" />
                <Label Margin="5" Grid.Row="5" Grid.Column="0" Content="Source:" HorizontalContentAlignment="Right"  />

                <Grid Grid.Row="5" Grid.Column="1" Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="auto" />
                    </Grid.ColumnDefinitions>
                    <TextBox Margin="0,0,5,0" Text="{Binding ProjectSource, Mode=TwoWay}" VerticalAlignment="Center" />
                    <Button Content="..." Grid.Column="1" MinWidth="25" Command="{Binding SetSourceCommand}" />
                </Grid>
                <Label Margin="5" Grid.Row="6" Grid.Column="0" Content="Destination:" HorizontalContentAlignment="Right"  />

                <Grid Margin="5" Grid.Row="6" Grid.Column="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="auto" />
                    </Grid.ColumnDefinitions>
                    <TextBox Margin="0,0,5,0" Text="{Binding ProjectDestination, Mode=TwoWay}" VerticalAlignment="Center" />
                    <Button Content="..." Grid.Column="1" MinWidth="25" Command="{Binding SetDestinationCommand}" />
                </Grid>
                <Label Margin="5" Grid.Row="7" Grid.Column="0" Content="Comment:" HorizontalContentAlignment="Right"  />
                <TextBox Margin="5" MinLines="7" MaxLines="7" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" Grid.Row="7" Grid.Column="1" Text="{Binding ProjectComment, Mode=TwoWay}" VerticalAlignment="Center" />
                <Label Grid.Row="8" Grid.ColumnSpan="2" Margin="5,10,5,5" Grid.Column="0" Padding="0" BorderThickness="0,0,0,1" Foreground="#666" BorderBrush="#666" Content="Storage Engine" FontSize="18" />
                <Label Margin="5" Grid.Row="9" Grid.Column="0" Content="Engine:" HorizontalContentAlignment="Right"  />
                <ComboBox Margin="5" Grid.Row="9" Grid.Column="1" ItemsSource="{Binding BackupEngines, Mode=TwoWay}" SelectedItem="{Binding ProjectStorageEngine, Mode=TwoWay}" VerticalAlignment="Center" />
            </Grid>
        </ScrollViewer>
        <WrapPanel HorizontalAlignment="Right" Grid.Row="1">
            <Button Command="{Binding SaveCommand}" Content="Save" Margin="5" MinWidth="75" />
            <Button Command="{Binding CancelCommand}" Content="Cancel" Margin="5" MinWidth="75" />
        </WrapPanel>
    </Grid>
</UserControl>
